package com.gxuwz.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.gxuwz.core.util.SystemContext;
import com.gxuwz.dao.impl.SysRightDao;
import com.gxuwz.pojo.SysRight;
import com.gxuwz.pojo.SysRight;
import com.gxuwz.service.ISysRightService;

@Service("sysRightService")
public class SysRightServiceImpl implements ISysRightService {

	@Autowired
	private SysRightDao sysRightDao;

	@Override
	public List<SysRight> list(SysRight entity) {
		// TODO Auto-generated method stub
		return sysRightDao.findByEntity(entity);
	}

	@Override
	public SysRight save(SysRight entity) {
		// TODO Auto-generated method stub
		return sysRightDao.save(entity);
	}

	@Override
	public void remove(SysRight entity) {
		// TODO Auto-generated method stub
		sysRightDao.remove(entity);
	}

	@Override
	public void update(SysRight entity) {
		// TODO Auto-generated method stub
		sysRightDao.update(entity);
	}

	@Override
	public List<SysRight> findByHql(String queryString, Object[] params) {
		// TODO Auto-generated method stub
		return sysRightDao.findByHql(queryString, params);
	}

	@Override
	public List<SysRight> findByExample(Object exampleEntity) {
		// TODO Auto-generated method stub
		return sysRightDao.findByExample(exampleEntity);
	}

	@Override
	public List<SysRight> findByEntity(SysRight entity) {
		// TODO Auto-generated method stub
		return sysRightDao.findByEntity(entity);
	}

	@Override
	public SysRight findById(Integer id) {
		// TODO Auto-generated method stub
		return sysRightDao.find("form SysRight where id="+id).get(0);
	}

	@Override
	public List<SysRight> findByProperty(String property, String value) {
		// TODO Auto-generated method stub
		return sysRightDao.findByProperty(property, value);
	}
	


}
